package com.gh.pattern.delegate;

import java.util.HashMap;
import java.util.Map;

public class Jingli implements ITarget{
    private Map<String,ITarget> targets = new HashMap<String,ITarget>();

    public Jingli() {
        targets.put("前端",new ChengxuyuanA());
        targets.put("后端",new ChengxuyuanB());
    }

    //经理自己不干活
    @Override
    public void dowork(String command) {
        targets.get(command).dowork(command);
    }
}
